<?php
/* @var $this MovieController */
/* @var $model Movie */
/* @var $form CActiveForm */

$this->breadcrumbs = array(
    Yii::t('default', 'Administration') => array('/'),
    Yii::t('default', 'Movies') => array('index'),
    $model->title => array('view', 'id' => $model->id),
    Yii::t('default', 'Update'),
);

$this->menu = array(
    array('label' => Yii::t('default', 'List Movie'), 'url' => array('index')),
    array('label' => Yii::t('default', 'Create Movie'), 'url' => array('create')),
    array('label' => Yii::t('default', 'View Movie'), 'url' => array('view', 'id' => $model->id)),
    array('label' => Yii::t('default', 'Manage Movie'), 'url' => array('admin')),
);
?>

<h1><?php echo Yii::t('default', 'Update Movie'); ?> #<?php echo $model->id; ?></h1>

<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'movie-form',
        'enableAjaxValidation' => false,
            ));
    ?>

    <p class="note"><?php echo Yii::t('default', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('default', 'are required'); ?>.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'title'); ?>
        <?php echo $form->textField($model, 'title', array('size' => 20, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'subject'); ?>
        <?php echo $form->textArea($model, 'subject', array('rows' => 6, 'cols' => 50)); ?>
        <?php echo $form->error($model, 'subject'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'source_image'); ?>
        <?php echo $form->textField($model, 'source_image', array('size' => 40, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'source_image'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'free_image'); ?>
        <?php echo $form->checkBox($model, 'free_image'); ?>
        <?php echo $form->error($model, 'free_image'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'year'); ?>
        <?php echo $form->textField($model, 'year'); ?>
        <?php echo $form->error($model, 'year'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'duration'); ?>
        <?php echo $form->textField($model, 'duration', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'duration'); ?>
    </div>
    
    <div class="row">
        <?php echo $form->labelEx($model, 'hidden'); ?>
        <?php echo $form->checkBox($model, 'hidden'); ?>
        <?php echo $form->error($model, 'hidden'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'wikipedia_url'); ?>
        <?php echo $form->textField($model, 'wikipedia_url', array('size' => 40, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'wikipedia_url'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'youtube_id'); ?>
        <?php echo $form->textField($model, 'youtube_id', array('size' => 20, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'youtube_id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'kp_id'); ?>
        <?php echo $form->textField($model, 'kp_id', array('size' => 10, 'maxlength' => 10)); ?>
        <?php echo $form->error($model, 'kp_id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'kp_rating'); ?>
        <?php echo $form->textField($model, 'kp_rating', array('size' => 3, 'maxlength' => 3)); ?>
        <?php echo $form->error($model, 'kp_rating'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'imdb_rating'); ?>
        <?php echo $form->textField($model, 'imdb_rating', array('size' => 3, 'maxlength' => 3)); ?>
        <?php echo $form->error($model, 'imdb_rating'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'language_id'); ?>
        <?php echo $form->dropDownList($model, 'language_id', $languages); ?>
        <?php echo $form->error($model, 'language_id'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton(Yii::t('default', 'Save')); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->